/*
 * MinIO Cloud Storage (C) 2018 MinIO, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import React from "react"
import classNames from "classnames"
import { connect } from "react-redux"
import SideBar from "./SideBar"
import TopBar from "./TopBar"
import MainContent from "./MainContent"
import AlertContainer from "../alert/AlertContainer"
// import Dashboard from "./Dashboard";

class Browser extends React.Component {
  constructor(props) {
    super(props)
    this.state = {
      showDashboardPanel: false
    }
  }
  /*  显示Dashboard */
  // showDashboard(e) {
  //   e.preventDefault()
  //   this.setState({
  //     showDashboardPanel: true
  //   })
  // }
  /*  隐藏Dashboard */
  // hideDashboard() {
  //   this.setState({
  //     showDashboardPanel: false
  //   })
  // }
  render() {
    return (
      <div
        className={classNames({
          "file-explorer": true
        })}
      >
        {/* <a href="" id="show-dashboard" onClick={this.showDashboard.bind(this)} className="dashboard-btn">
          Dashboard <i className="fas fa-chevron-circle-right" />
        </a>
        {this.state.showDashboardPanel && (
          <Dashboard
            hideDashboard={this.hideDashboard.bind(this)}
          />
        )} */}
        <SideBar />
        <TopBar/>
        <MainContent />
        <AlertContainer />
      </div>
    )
  }
}

export default connect(state => state)(Browser)
